<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="java.io.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ErrorPage</title>
</head>
<body>
	
	<%
		request.setCharacterEncoding("UTF-8");
		String message=request.getParameter("message");
		PrintWriter writer=response.getWriter();
		if(message.contentEquals("该用户名太受欢迎啦，换一个吧~")){
			%>
			<script>
				alert("该用户名太受欢迎啦，换一个吧~");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("信息修改成功")){
			%>
			<script>
				alert("信息修改成功");
				window.location.href="personalDetails.jsp";
			</script>
			<%
		}else if(message.contentEquals("修改成功")){
			%>
			<script>
				alert("您修改了用户名，请重新登陆");
				window.location.href="loadIn.jsp";
			</script>
			<%
		}else if(message.contentEquals("密码修改成功")){
			%>
			<script>
				alert("密码修改成功，请重新登录");
				window.location.href="loadIn.jsp";
			</script>
			<%
		}else if(message.contentEquals("登录失败，请重新检查")){
			%>
			<script>
				alert("登录失败，请重新检查");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("ERROR，请重新检查输入")){
			%>
			<script>
				alert("ERROR，请重新检查输入");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("充值成功")){
			%>
			<script>
				alert("充值成功");
				window.location.href="personalDetails.jsp";
			</script>
			<%
		}else if(message.contentEquals("账户已注销")){
			%>
			<script>
				alert("账户成功注销");
				window.location.href="loadIn.jsp";
			</script>
			<%
		}else if(message.contentEquals("成功加入购物车")){
			%>
			<script>
				alert("成功加入购物车");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("该商品又增加了")){
			%>
			<script>
				alert("该商品又增加了");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("该商品不能购买更多啦")){
			%>
			<script>
				alert("该商品不能购买更多啦");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("创建订单成功")){
			%>
			<script>
				alert("创建订单成功");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("增加该订单")){
			%>
			<script>
				alert("增加该订单");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("资金不足，请充值")){
			%>
			<script>
				alert("资金不足，请充值");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("订单撤回成功")){
			%>
			<script>
				alert("订单删除成功");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("商品删除成功")){
			%>
			<script>
				alert("商品删除成功");
				window.location.href="personalDetails.jsp";
			</script>
			<%
		}else if(message.contentEquals("订单已确认")){
			%>
			<script>
				window.location.href="personalDetails.jsp";
			</script>
			<%
		}else if(message.contentEquals("该商品已下架")){
			%>
			<script>
				alert("该商品已下架");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("商品操作")){
			%>
			<script>
				alert("操作成功");
				window.history.go(-1);
			</script>
			<%
		}else if(message.contentEquals("您还有订单未完成")){
			%>
			<script>
				alert("您还有订单未完成");
				window.history.go(-1);
			</script>
			<%
		}
		
	%>
	
</body>
</html>